<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
    *{padding: 0;margin: 0}
    .main{
        width:50px;
        height: 100px;
        box-sizing: border-box;
        border: 1px solid #333;
        position: relative;
        overflow: hidden;
        transition: all 2 2;
    }
    .cover{
        width:50px;
        height: 100px;
        box-sizing: border-box;
        background: #333;
        opacity: 0.5;
        transform: rotate(90deg);
        transform-origin:bottom right;
        box-sizing: border-box;
        position: absolute;
        z-index: 100;
        transition: all 2s;
    }
    .main:hover .cover{
        transform: rotate(0deg);
        transform-origin:bottom left;
       
    }
    </style>
</head>
<body>
    <div class="main">
        <div class="cover">

        </div>
    </div>
</body>
</html>